package cn.csc.module.system.api.ip;

import cn.csc.framework.common.pojo.CommonResult;
import cn.csc.module.system.api.ip.dto.CompanyCodeDto;
import cn.csc.module.system.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(name = ApiConstants.NAME) // TODO fallbackFactory =
@Api(tags = "RPC 服务 - 快递100快递公司标准编码")
public interface KuaiDi100CompanyCodeApi {
    String PREFIX = ApiConstants.PREFIX + "/kuaidi100";

    /**
     * 通过公司编码获取数据
     */
    @GetMapping(PREFIX +"/getByCode")
    @ApiOperation("通过公司编码获取数据")
    @ApiImplicitParam(name = "code", value = "公司编码", required = true, example = "2048")
    CommonResult<CompanyCodeDto> getByCode(@RequestParam("code") String code );

}
